<template>
  <div ref="divRef">
    App {{ count }} {{ a }} {{ personalbar.name }} {{ oddOrEven }}

  </div>
  <button @click="handleClick">按钮</button>
  <Child ref="childRef" :person="person" @setCount="handleClick"
</template>

<script lang="ts" setup>

import {ref,reactive,watch,computed,onMounted} from "vue";

import Child from "./views/child/index.vue";

const divRef =ref();
console.log(divRef.value);
const childRef =ref();

const handleClick = () => {
  count.value++;
};

let a =123;

watch(count,(count) =>{
  console.log(count);
});
const oddOrEven = computed(() =>{
  return count.value % 2 === 0 ? "偶数" : "奇数";
});

onMounted(() => {
  console.log("onMounted");
  console.log(divRef.value);
  console.log(childRef.value);
});

</script>

<style></style>